﻿//=====================================================
// Copyright © 2017-2018 xuxuzhaozhao
// All rights reserved
// GUID: 671311dc-e681-45ff-a043-080196ddd25e
// CLR版本: 4.0.30319.42000
// 新建项输入的名称: CustomAssembliesResolver
// 机器名称: WIN10-20170502F
// 注册组织名: 成都名门汇科技有限公司（谊诚科技）
// 命名空间名称: UnitTestingWebAPI.API.Core
// 文件名: CustomAssembliesResolver
// 当前系统时间: 2017/10/21 17:48:30
// 当前登录用户名: xuxuzhaozhao
//======================================================

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http.Dispatcher;
using UnitTestingWebAPI.API.Core.Controller;

namespace UnitTestingWebAPI.API.Core
{
    public class CustomAssembliesResolver : DefaultAssembliesResolver
    {
        public override ICollection<Assembly> GetAssemblies()
        {
            var baseAssemblies = base.GetAssemblies().ToList();
            var assemblies = new List<Assembly>(baseAssemblies) { typeof(BlogsController).Assembly };
            baseAssemblies.AddRange(assemblies);

            return baseAssemblies.Distinct().ToList();
        }
    }
}
